package admin

import (
	"myserver/app/controllers/file"
	"myserver/app/jwt"

	"github.com/gin-gonic/gin"
)

func RegisterFileRouters(r *gin.Engine) {
	f := file.UploadFileController{}
	fileRouter := r.Group("/file")
	fileRouter.Use(jwt.ValidateToken())
	{
		fileRouter.POST("/UploadFile", f.UploadFile)
		fileRouter.GET("/GetFile", f.GetFile)
		fileRouter.GET("/GetFileList", f.List)
		fileRouter.POST("/DellFile", f.DellFile)
	}
}
